

interface Car {
    brandNo: string
}

interface Plane {
    No: string
    brandNo: string
}

type TyVechile = Car | Plane

let vechile: TyVechile = { brandNo:'奔驰', No:'A1001' }

// 接口可以extends(继承) 一个或者多个,type 不行，这也是为啥选择接口的原因

// 接口合并声明, type不行
interface Error {
    name: string;
}

interface Error {
    message: string;
    stack?: string;
}

let error: Error = {
    message: '空指针',
    name:'NullPointException'
}

export {}